﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Updaterfkh.aspx.cs" Inherits="WeChat.Updaterfkh" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title></title>
     <script src="../bootstrap-3.3.5-dist/js/jquery-1.11.3.min.js" type="text/javascript"></script>
    <%--<link href="bootstrap-3.3.5-dist/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <script src="bootstrap-3.3.5-dist/js/bootstrap.min.js" type="text/javascript"></script>--%>

    <link href="css/weui.css" rel="stylesheet" />
    <%--<link href="css/bindstyle.css" rel="stylesheet" type="text/css" />--%>
    <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>  
    <script src="layer/layer.js"></script>
       <script type="text/javascript">
	   $(function () {
	       $("#bt1").click(function () {
		   //卡号
		   var cardid = $("#cardid").val();
		   //登录密码
		   var qpassword = $("#qpassword").val();
		   //获取Opid
		   var Opid = "<%=Session["openid"]%>";
		   $.ajax({
		       url: "Ajax/BinDing.ashx",
		       type: "post",
		       data: { cardid: cardid, qpassword: qpassword, Opid:Opid,BinDingType:"BinDingrfkh"},
		       success: function (data) {
			   if (data=="0"){
			       layer.msg("登录密码错误！", { icon: 5 });
			   } else if (data == "1") {
			       $("#panel1").hide();
			       $("#success").show();
			   } else if (data == "2") {
			       layer.msg("卡号已存在！", { icon: 5 });
			   } else {
			       layer.msg("绑定失败！", { icon: 5 });
			   }
		       }
		   });
		   return false;
	       });

	   });
       </script>
<style>
.top {
	background-color: #fafafa;
	border-bottom: 1px solid #c8c8c8;
	height: 44px;
	line-height: 44px;
	position: relative;
	margin-bottom: 10px;
}
.top h1 {
	color: #333;
	font-size: 18px;
	font-weight: 400;
	text-align: center;
	text-shadow: 0 1px 1px #fff;
	white-space: nowrap;
}
</style>
</head>
<body>
    <div class="top">
            <h1><span>绑定卡号</span></h1>
        </div>
       <%-- <div><asp:Label ID="notes" runat="server" Text="您还未绑定账号，请先绑定账号：" ForeColor="BlueViolet"></asp:Label></div>--%>
       <form id="slicklogin" runat="server">
        
        <%--<div runat="server" id="panel1">
            <p id="notice" runat="server" style="color: Red"></p>
            <label for="cardid">cardid</label><input type="text" id="cardid" name="cardid" class="placeholder" placeholder="卡号" onclick="clean()" maxlength="10" />
            <label for="username">username</label><input type="text" id="name" name="name" class="placeholder" placeholder="用户名" onclick="clean()" maxlength="10"/>
            <label for="password">password</label><input type="password" id="password" name="password" class="placeholder" placeholder="密码" onclick="clean()" maxlength="16"/>
            <asp:Button ID="bt1" runat="server" Text="点此绑定" OnClientClick="return check()" OnClick="binding" />
        </div>--%>
        <div runat="server" id="panel1">
        <div class="weui_cells weui_cells_form">
            <div class="weui_cell">
                <div class="weui_cell_hd"><label class="weui_label">卡号</label></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input id="cardid" name="cardid" class="weui_input" type="text" placeholder="请输入卡号"   maxlength="10"/>
                </div>
            </div>
            <div class="weui_cell">
               <%-- <div class="weui_cell_hd"><label class="weui_label">再次确认</label></div>--%>
                 <div class="weui_cell_hd">登录密码</div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input id="qpassword" name="qpassword" class="weui_input" type="password" placeholder="请输入登录密码" onclick="clean()" maxlength="16"/>
                </div>
             
            </div>
        </div>
        <div class="weui_cells_tips"><span id="notice" runat="server" style="color:Red; font-size:medium"></span></div>
        <div class="weui_btn_area">
            <asp:Button ID="bt1" runat="server" Text="确认绑定"   CssClass="weui_btn weui_btn_primary"   />
           <%-- <a class="weui_btn weui_btn_primary" href="javascript:" id="showTooltips">确定</a>--%>
        </div>
        </div>
      
    </form>
   <div class="weui_msg" id="success" runat="server" style="display:none;">
        <div class="weui_icon_area"><i class="weui_icon_success weui_icon_msg"></i></div>
        <div class="weui_text_area">
            <h2 class="weui_msg_title">绑定卡号成功！</h2>
        </div>
        <div class="weui_opr_area">
            <p class="weui_btn_area">
                <a href="index.html" class="weui_btn weui_btn_primary">确 定</a>
            </p>
        </div>
    </div>
</body>
</html>
